package com.geekstudy.week6.extend;

import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;

public class URLConnectionAdapter {

    private URL url;

    public URLConnectionAdapter(URL url) {
        this.url = url;
    }

    public URLConnection adapter() {
        URLConnection urlConnection = new URLConnection(url) {
            @Override
            public void connect() throws IOException {

            }
        };

        return urlConnection;
    }
}
